﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;
using WCS.Infrastructure.Attr;
using WCS.Infrastructure.Dto.Request.Epaylinks;
using WCS.Infrastructure.Dto.Request.Organization;
using WCS.Infrastructure.Dto.Request.Payment;
using WCS.Infrastructure.Dto.Response.Common;
using WCS.Infrastructure.Dto.Response.Epaylinks;
using WCS.Infrastructure.EFCore;

namespace WCS.Service.Interface
{
    [Provider]
    public interface IOrganizationService
    {
        /// <summary>
        /// 新增系统角色
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> AddRoleAsync(RoleRequestDto dto);

        /// <summary>
        /// 删除系统角色
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> DeleteRoleAsync(RoleRequestDto dto);

        /// <summary>
        /// 编辑系统角色
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> UpdateRoleAsync(RoleRequestDto dto);

        /// <summary>
        /// 获取系统角色列表
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> GetRoleListAsync(RoleRequestDto dto);

        /// <summary>
        /// 获取用户角色商户列表
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> GetUserRoleMerchantListAsync(string? userId);

        /// <summary>
        /// 注册商户
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> RegisteredMerchantAsync(MerchantRequestDto dto);

        /// <summary>
        /// 商户进件
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> MerchantEntryAsync(EpaylinksMerchantInfoRequestDto dto);

        /// <summary>
        /// 商户补件
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> MerchantSupplementAsync(EpaylinksMerchantInfoRequestDto dto);

        /// <summary>
        /// 新增结算账户
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> AddSettlementAccountAsync(EpaylinksSettlementAccountInfo dto,string merId);

        /// <summary>
        /// 图片/附件上传
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> FileUploadAsync(CreateUpdateFileUploadDto dto);

        /// <summary>
        /// 商户审核结果回调通知
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<EpaylinksResponseDto> HandleMerchantAuditResultNotificationAsync(MerchantAuditResultNotificationRequest dto);

        /// <summary>
        /// 查询进件商户信息
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> QueryMerchantAsync(QueryMerchantInfoRequestDto dto);

        /// <summary>
        /// 获取用户商户列表
        /// </summary>
        /// <returns></returns>
        Task<ApiResult> GetUserMerchantListAsync();

        /// <summary>
        /// 获取商户列表
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> GetMerchantListAsync(MerchantRequestDto dto);

        /// <summary>
        /// 获取单个商户详情
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task<ApiResult> GetMerchantDetailAsync(string Id);

        /// <summary>
        /// 获取单个商户进件信息详情
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task<ApiResult> GetMerchantEntryDetailAsync(string Id);

        /// <summary>
        /// 删除商户
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> DeleteMerchantAsync(MerchantRequestDto dto);

        /// <summary>
        /// 编辑商户
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> UpdateMerchantAsync(MerchantRequestDto dto);

        /// <summary>
        /// 新增门店
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> AddStoreAsync(StoreRequestDto dto);


        /// <summary>
        /// 获取商户下的门店列表
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> GetStoreListAsync(StoreRequestDto dto);

        /// <summary>
        /// 获取单个门店详情
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> GetStoreDetailAsync(StoreRequestDto dto);

        /// <summary>
        /// 在门店详情里批量设置关联成员
        /// </summary>
        Task<ApiResult> SetStoreMembersAsync(BindMembersRequestDto dto);

        /// <summary>
        /// 编辑门店
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> UpdateStoreAsync(StoreRequestDto dto);

        /// <summary>
        /// 删除门店
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> DeleteStoreAsync(StoreRequestDto dto);

        /// <summary>
        /// 更新登录用户的角色选择（用户切换商户角色）
        /// </summary>
        /// <param name="userRoleId"></param>
        /// <returns></returns>
        Task<ApiResult> UpdateLoginUserRoleAsync(string userRoleId);

        /// <summary>
        /// 检查当前手机号的用户是否在该商户下存在角色
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> CheckTeamMembersAsync(UserRoleRequestDto dto);

        /// <summary>
        /// 检查手机号用户是否存在
        /// </summary>
        /// <param name="phone"></param>
        /// <returns></returns>
        Task<bool> CheckUserAsync(string phone);

        /// <summary>
        /// 新增团队成员
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> AddTeamMembersAsync(UserRoleRequestDto dto);

        /// <summary>
        /// 团队成员确认加入
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> TramMembersConfirmAsync(UserRoleRequestDto dto);

        /// <summary>
        /// 获取团队成员列表
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> GetTeamMembersListAsync(UserRoleRequestDto dto);

        /// <summary>
        /// 获取单个团队成员详细信息
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> GetTeamMembersAsync(UserRoleRequestDto dto);

        /// <summary>
        /// 编辑团队成员信息
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> UpdateTeamMembersAsync(UserRoleRequestDto dto);

        /// <summary>
        /// 删除团队成员
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> DeleteTeamMembersAsync(DeleteUserRoleRequestDto dto);

        
    }
}
